package com.ruoyi.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author TanShuQi
 * @date 2021/12/24 14:51:26
 */
@Getter
@AllArgsConstructor
public enum ResultCode implements BaseCode {

    SUCCESS(200, "请求接口成功"),
    FAILED(500, "服务器报错，联系后端修改"),
    STOCK(501, "库存不足"),
    EXIST(502, "所请求的资源已存在！"),
    FORBIDDEN_STATUS(502,"当前角色已有账号关联，请先修改后再禁用"),
    VALIDATE_FAILED(422, "表单参数提交错误，请确认参数"),
    UNAUTHORIZED(401, "用户token认证失败，需要重新获取token"),
    TOKEN_FAILED(402, "解析IdAas的id_token失败， 联系后端人员查看"),
    FORBIDDEN(403, "没有相关权限"),
    NOT_EXIST(404, "所请求的资源不存在！"),
    VALIDATED(422,"参数校验错误！必要字段未填写"),
    COR_ENABLE(406, "企业已被禁用！"),
    UPLOAD_FAILED(407, "企业已被禁用！"),
    IMPORT_ERROR(408, "导入异常"),
    FILE_MAX(409, "文件过大异常");
    private final Integer code;
    private final String message;
}
